<%--
 *  File:   ZylEmployeeCollateView.jsp
 *  Desc:	the Lend slip summary page
 *
 *  Date		  Author		  Changes
 *  2011-11-22	  gengan		  Created
 *
 *  Copyright (C) 2000 - 2012 Oval Technologies, Inc
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%
  //init param
  String strModuleName = "COM";
  String privilegeCode = "A0706";
  String contextPath = request.getContextPath();
  HashMap CurUserInfo = (HashMap)session.getAttribute("userinfo");
  String  isadmin=(String)CurUserInfo.get("isadmin");
  if(isadmin==null) isadmin="";
  Integer issalesman = (Integer)((HashMap)session.getAttribute("userinfo")).get("issalesman");
%>

<%@ include file="/inc/CommonHeader.inc" %>
<%@ include file="/inc/OvalLocationDefault.inc" %>
<%@ include file="/inc/Security.inc" %>


<html>
<head>
<title>EmployeeCollateSummary</title>
<PageFlow:CheckPageFlow pageName="p_employeecollateview"/>
<%

   Vector summary = (Vector)pageContext.getAttribute("totalsummary");
   if(summary == null)summary = new Vector();
%>
<%@ include file="/inc/CatchError.inc" %>
<%@ include file="/inc/SumDiv.inc" %>
<%@ include file="/rpt/ReportURL.inc" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/SummaryDivision.js"></script>
<script language="JavaScript" src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/FuncLib.js"></script>
<script type="text/javascript" src="<%=contextPath%>/js/opal2/mootools.js"></script>
<%@ include file="/inc/NewCalendar.inc" %>
<script language="JavaScript">

window.onload= function(){
	if(document.cform.preflag.value==1){
		document.cform.preflag1.checked=true;
	}else{
		document.cform.preflag1.checked=false;
	}
}

function page_summary(actionvalue,orderbyname){
	if (document.cform.preflag1.checked==true){
		document.cform.preflag.value=1;
	}
	else{
		document.cform.preflag.value=2;
	}	
	var editform = summaryPrepare(cform,actionvalue,orderbyname);
	if(!editform) return;
	editform.action = "ZylEmployeeCollateView.jsp?<%= OvalTools.randomURL() %>";
	editform.target = "_self";
	isRunning = true;
	editform.submit();
 }
 

//salesman
function popRep() {
    var businessareaid = document.cform.areaids.value;
	var status = "height=400, width=600, top=100, left=100, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no";
	var url = "<%=contextPath%>/tdr/dataverify/SalesPopWindow.jsp?<%= OvalTools.randomURL() %>&areaids="+businessareaid;
	popwindow = window.open(url, "newwindow", status);
  }

function SetSalesMan(id,code,name){
	cform.userids.value=id;
	cform.employeecode.value=code;
	cform.employeename.value=name;
}

//getsecond 
function page_getpriviceoffice(){
	var objdeptcode=eval("cform.regionid");
	if (objdeptcode==""){
	    return;
	}
	var  datahandler = new  DataHandler();
	datahandler.add_params("regionid" , objdeptcode.value , "Integer");
	datahandler.getResultFromVector("resultproviceoffice","proviceofficename","proviceofficecode","document.cform.proviceofficelist");
	datahandler.add_job("j_zylbusinessareainfobuystock");
	datahandler.runDataHandler();
  }

function page_getbusinessarea(){
	var objdeptcode=eval("cform.proviceofficelist");
	var regionid = document.cform.regionid.value;
	if (objdeptcode==""){
	    return;
	}
	var  datahandler = new  DataHandler();
	datahandler.add_params("regionid" , regionid , "Integer");
	datahandler.add_params("proviceofficelist" , objdeptcode.value , "String");
	datahandler.getResultFromVector("resultbusinessarea","businessareaname","businessareacode","document.cform.businessarealist");
	datahandler.add_job("j_zylbusinessareainfobuystock");
	datahandler.runDataHandler();
 }
//clear text value
function page_clear(){
	document.cform.areaids.value="";
	document.cform.businessareaname.value = "";
	document.cform.employeename.value="";
	document.cform.dtcode.value="";
	document.cform.orgcode.value="";
	document.cform.productcode.value="";

	document.cform.usercode.value="";
	document.cform.dtname.value="";
	document.cform.orgname.value="";
	document.cform.productname.value="";
    document.cform.categoryid.value="";
	document.cform.username.value="";
}

function changecategorycode(){
	
	var categoryIndex = cform.categoryid.options[cform.categoryid.selectedIndex].value;
	if(categoryIndex =="" || categoryIndex==null)cform.categorycode.value=null;
	if(categoryIndex == 4 )cform.categorycode.value = "001";
	if(categoryIndex == 5 )cform.categorycode.value = "002";
}
function page_downloadCSV(){
	preflag=document.cform.preflag.value;
	dtcode = document.cform.dtcode.value;	
	dtname =document.cform.dtname.value;
	//orgcode =document.cform.orgcode.value;
	
	productcode =document.cform.productcode.value;
	productname= document.cform.productname.value;
	usercode = document.cform.usercode.value;
	username = document.cform.username.value;
	years = document.cform.years.value;
	months = document.cform.months.value;
	userid = document.cform.userid.value;
	categorycode = document.cform.categorycode.value;
    orgcountyname = document.cform.orgcountyname.value;
    <%if("Y".equals(isadmin)){%>
  
	var businessareaid = document.cform.areaids.value;
	var userids =document.cform.userids.value;
	var orgname = document.cform.orgname.value;
	if(preflag==1){
	   
	  window.open("<%=reportURL%>/csv?__report=/ovalreport/EmployeeCollateConfirmView2.txt&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&orgcountyname="+orgcountyname+"&employeeids="+userids+"&preflag="+preflag);
	  }else{ 
	 window.open("<%=reportURL%>/csv?__report=/ovalreport/EmployeeCollateConfirmView2.txt&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&orgcountyname="+orgcountyname+"&employeeids="+userids);
	}

 	<% }else{%>
 	    var stdareaid = document.cform.businessareaid.value;
	    var deptid = document.cform.deptid.value;
	    var deptcode = document.cform.deptcode.value;
	    var url ;
	 	<%  if(!"1".equals(issalesman)){%> 
		 	 var businessareaid = document.cform.areaids.value;
			 var userids =document.cform.userids.value;
			 var orgname = document.cform.orgname.value;
			 if(preflag==1){
				 url="<%=reportURL%>/csv?__report=/ovalreport/EmployeeCollateConfirmView.txt&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&employeeid="+userid+"&orgcountyname="+orgcountyname+"&employeeids="+userids+"&preflag="+preflag;
			
			  }else{ 
			     url="<%=reportURL%>/csv?__report=/ovalreport/EmployeeCollateConfirmView.txt&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&employeeid="+userid+"&orgcountyname="+orgcountyname+"&employeeids="+userids;
			 }
	 	<% }else{%>
	 		if(preflag==1){
		 	     url="<%=reportURL%>/csv?__report=/ovalreport/EmployeeCollateConfirmView.txt&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&productcode="+productcode+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&employeeid="+userid+"&orgcountyname="+orgcountyname+"&preflag="+preflag;
		  	}else{ 
		 	     url="<%=reportURL%>/csv?__report=/ovalreport/EmployeeCollateConfirmView.txt&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&productcode="+productcode+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&employeeid="+userid+"&orgcountyname="+orgcountyname;
		    }
	 	<%}%>
 		if( "YL01006" == deptcode){
			url=url+"&stdareaid="+stdareaid;
		}else{
			url=url+"&stdareaid="+stdareaid+"&deptid="+deptid;
		}
		window.open(url);
  <%}%>
	
	
}

function page_downloadALLCSV(){
	preflag=document.cform.preflag.value;
	dtcode = document.cform.dtcode.value;	
	dtname =document.cform.dtname.value;
	//orgcode =document.cform.orgcode.value;
    orgname = document.cform.orgname.value;
	productcode =document.cform.productcode.value;
	productname= document.cform.productname.value;
	usercode = document.cform.usercode.value;
	username = document.cform.username.value;
	years = document.cform.years.value;
	months = document.cform.months.value;
	userid = document.cform.userid.value;
	categorycode = document.cform.categorycode.value;
	orgcountyname = document.cform.orgcountyname.value;
	var userids =document.cform.userids.value;
	var businessareaid = document.cform.areaids.value;
	
	if(preflag==1){
		window.open( "<%= reportURL %>/csv?__report=/ovalreport/EmployeeCollateConfirmALLView.txt&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&orgcountyname="+orgcountyname+"&userids="+userids+"&preflag="+preflag);
		
	}else{
		window.open( "<%= reportURL %>/csv?__report=/ovalreport/EmployeeCollateConfirmALLView.txt&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&orgcountyname="+orgcountyname+"&userids="+userids);
		
	}
}
 
function page_downloadEXCEL(){
	preflag=document.cform.preflag.value;
	dtcode = document.cform.dtcode.value;	
	dtname =document.cform.dtname.value;
	//orgcode =document.cform.orgcode.value;
	
	productcode =document.cform.productcode.value;
	productname= document.cform.productname.value;
	usercode = document.cform.usercode.value;
	username = document.cform.username.value;
	years = document.cform.years.value;
	months = document.cform.months.value;
	userid = document.cform.userid.value;
	categorycode = document.cform.categorycode.value;
	orgcountyname = document.cform.orgcountyname.value;

	<%if("Y".equals(isadmin)){%>
		var businessareaid = document.cform.areaids.value;
		var userids =document.cform.userids.value;
		var orgname = document.cform.orgname.value;
		if(preflag==1){
		   
		  window.open("<%=reportURL%>/servlet/ExcecuteReport/EmployeeCollateConfirmView.sox?__format=xlsx&__folder=/ovalreport&rownum=2&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&orgcountyname="+orgcountyname+"&employeeids="+userids+"&preflag="+preflag);
		  }else{ 
		 window.open("<%=reportURL%>/servlet/ExcecuteReport/EmployeeCollateConfirmView.sox?__format=xlsx&__folder=/ovalreport&rownum=2&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&orgcountyname="+orgcountyname+"&employeeids="+userids);
		}
 	<% }else{%> 
 	    var stdareaid = document.cform.businessareaid.value;
 	    var deptid = document.cform.deptid.value;
 	    var deptcode = document.cform.deptcode.value;
 	    var url ;
 		<% if(!"1".equals(issalesman)){%> 
		 	 var businessareaid = document.cform.areaids.value;
			 var userids =document.cform.userids.value;
			 var orgname = document.cform.orgname.value;
			 if(preflag==1){
			    url="<%=reportURL%>/servlet/ExcecuteReport/EmployeeCollateConfirmView.sox?__format=xlsx&__folder=/ovalreport&rownum=2&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&employeeid="+userid+"&orgcountyname="+orgcountyname+"&employeeids="+userids+"&preflag="+preflag+"&stdareaid="+stdareaid;
			  }else{ 
			    url="<%=reportURL%>/servlet/ExcecuteReport/EmployeeCollateConfirmView.sox?__format=xlsx&__folder=/ovalreport&rownum=2&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&businessareaid="+businessareaid+"&productcode="+productcode+"&orgname="+escape(encodeURI(orgname))+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&employeeid="+userid+"&orgcountyname="+orgcountyname+"&employeeids="+userids+"&stdareaid="+stdareaid;
			 }
 		<% }else{%>
	 		if(preflag==1){
	 			url="<%=reportURL%>/servlet/ExcecuteReport/EmployeeCollateConfirmView.sox?__format=xlsx&__folder=/ovalreport&rownum=2&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&productcode="+productcode+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&employeeid="+userid+"&orgcountyname="+orgcountyname+"&preflag="+preflag+"&stdareaid="+stdareaid;
		    }else{ 
		    	url="<%=reportURL%>/servlet/ExcecuteReport/EmployeeCollateConfirmView.sox?__format=xlsx&__folder=/ovalreport&rownum=2&dtcode="+dtcode+"&dtname="+escape(encodeURI(dtname))+"&productcode="+productcode+"&productname="+escape(encodeURI(productname))+"&usercode="+usercode+"&username="+escape(encodeURI(username))+"&years="+years+"&months="+months+"&categorycode="+categorycode+"&employeeid="+userid+"&orgcountyname="+orgcountyname+"&stdareaid="+stdareaid;
		    }
 		<%}%>
 		if( "YL01006" != deptcode){
 			url=url+"&deptid="+deptid;
 		}
 		window.open(url);
 	<%}%>
}

function page_uploadEXCEL(){
	this.location.href = "<%= contextPath%>/phap/masterdata/spm/UploadEXL.jsp?first=ZZ&second=ZB01&third=Z0608&<%= OvalTools.randomURL() %>";
}
function popBusinessarea_moulty(){
	if(popwindow!=null) popwindow.close();
	
    url = '<%=contextPath %>/phap/phap.datp/masterdata/cm/dataclean/ZylStdareaSelect.jsp?<%= OvalTools.randomURL() %>';
    attribute = 'height=600, width=900,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no';
	popwindow = window.open(url,'newwindow', attribute);
}

function setAreas(areaids,areanames,areacodes){

	document.cform.areaids.value = areaids;
	document.cform.businessareaname.value = areanames;
	//document.cform.businessareacode.value = areacodes;
}
function onLoad(){

	<%
	String strcatid = "";
	if(pageContext.getAttribute("categoryid")=="" || pageContext.getAttribute("categoryid")==null){
		strcatid = "-1";
	}else{
		strcatid = (Integer)pageContext.getAttribute("categoryid")+"";
	}
	%>
	<%if(strcatid.equals("4")){%>
	cform.categoryid.options[1].selected=true;
	<%}else if(strcatid.equals("5")){%>
	cform.categoryid.options[2].selected=true;
	<%}else{%>
	cform.categoryid.options[0].selected=true;
	<%}%>
	}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onload="onLoad();">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
<input type="hidden" name="pagename" value="p_employeecollateview">
<input type="hidden" name="actionname">
<custom:hidden  property = "portname"/>
<custom:hidden  property = "categorycode"/>
<custom:hidden  property = "employeecollateids"/>
<input type="hidden" name = "flag" value="y"/>
<custom:hidden  property = "preflag"/>
<custom:hidden property="userid" name="userinfo" scope="session"/>
<custom:hidden property="businessareaid" name="userinfo" scope="session"/>
<custom:hidden property="deptcode" name="deptinfo" />
<custom:hidden property="deptid" name="deptinfo" />

<custom:hidden property="businesstype"/>

<%@ include file="/inc/PageLocation.inc" %>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" onkeydown="if(event.keyCode==13) page_summary('search');">
        
		<tr>
	        <td class="td_right" width="9%"><%= "经销商编码" + label.getLabelName("L_Colon") %></td>
            <td class="td_left" width="11%">
                <custom:text property="dtcode" size="15" />
			</td>
			
			<td class="td_right" width="9%"><%= "产品编码" + label.getLabelName("L_Colon") %></td>
            <td class="td_left" width="11">
                <custom:text property="productcode" size="15" />
			</td>
		<!-- 
				<td class="td_right" width="9%"><%= "分配人工号" + label.getLabelName("L_Colon") %></td>
            <td class="td_left" width="11%">
                <custom:text property="serassignercode" size="15" />
			</td>
			-->
			<td class="td_right" width="9%"><%= "代表工号" + label.getLabelName("L_Colon") %></td>
            <td class="td_left" width="11%">
                <custom:text property="usercode" size="15" />
			</td>
        </tr>
		<tr>
			<td class="td_right"><%= "经销商名称" + label.getLabelName("L_Colon") %></td>
            <td class="td_left">
                <custom:text property="dtname" size="15" />
			</td>
				
			
			<td class="td_right"><%= "产品名称" + label.getLabelName("L_Colon") %></td>
            <td class="td_left">
                <custom:text property="productname" size="15" />
			</td>
			<td class="td_right"><%= "代表名称" + label.getLabelName("L_Colon") %></td>
            <td class="td_left">
                <custom:text property="username" size="15" />
			</td>
			<!-- 
				<td class="td_right"><%= "分配人名称" + label.getLabelName("L_Colon") %></td>
            <td class="td_left">
                <custom:text property="serassignername" size="15" />
			</td>
				-->
		
        </tr>
    
          <% if(!"1".equals(issalesman)){%> 
	      
         <tr>
        	     <td  class="td_right"><%=label.getLabelName("L_Provicetdr") +  label.getLabelName("L_Colon") %>
				</td>
			 <td  class="td_right"> <custom:hidden  property="areaids" /><custom:text  property="businessareaname"  label="L_Provicetdr" readonly="true"/><a onclick="popBusinessarea_moulty()"><custom:button type="3" value="*"/></a>
		           </td>
           <td class="td_right"><%=label.getLabelName("L_BusinessContact") +  label.getLabelName("L_Colon") %></td>
				<td><custom:text property="employeename" size="20" readonly="true" style="border:1px #7F9DB9 solid;"/><a onClick="javascript:popRep();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a> 
			    <custom:hidden property="userids"/>
			    <custom:hidden property="employeecode"/>
		        </td>
		        <td class="td_right"><%= "非锁客户名称" + label.getLabelName("L_Colon") %></td>
            <td class="td_left">
                <custom:text property="orgname" size="15" /><custom:hidden property="orgcode"/>
			</td>
				<td ><button type="button" onclick="page_clear()" class="button1" name="re" value="clear" style="width:60"><%=label.getLabelName("L_Clear") %></button></td>
        	</tr>
        	<%} %>
		<tr>
			<td class="td_right" ><%=label.getLabelName("L_Year1") +  label.getLabelName("L_Colon") %></td>
	        <td class="td_left"><custom:selectdic property="years" dictType="Years" command="notnull" label="L_Year1"/></td>
	        <td class="td_right"><%=label.getLabelName("L_Month") +  label.getLabelName("L_Colon") %></td>
	        <td class="td_left"><custom:selectdic property="months" dictType="Months" command="notnull" label="L_Month"/></td>
	        <td class="td_right"><%=label.getLabelName("L_ProdCategory") +  label.getLabelName("L_Colon") %></td>
			<td class="td_left"><custom:selectdic property="categoryid" dictType="PatentOrPopular" valueCriteria="4,5" defaultValueCost=" " defaultValue="-----------" onchange="changecategorycode();"></custom:selectdic>
			<td class="td_right"><%= "非锁区县名称" + label.getLabelName("L_Colon") %></td>
            <td class="td_left">
                <custom:text property="orgcountyname" size="15" />
				</td>
			<td class="td_right"><%= "预处理失败数据" + label.getLabelName("L_Colon") %></td>
			<td class="td_left">
                <custom:checkbox property="preflag1" />
				<a href="javascript:page_summary('search')"><img src="/oval/images/cn/go.gif" border="0" ></a>
				</td>
			<!--<td class="td_right"><%= "状态" + label.getLabelName("L_Colon") %></td> -->
            <td class="td_right" colspan="8">
			<!-- 	<custom:selectdic dictType="AssignStatus" property="serstatus" defaultValue="------" defaultValueCost=""/>-->
				&nbsp;&nbsp;
			
			</td>
			<td class="td_left">&nbsp; </td>
			<td class="td_right">&nbsp;</td>
			<td class="td_right">&nbsp;</td>
			<td class="td_left">&nbsp;</td>
			<td width="*" colspan="7">&nbsp;</td>
		</tr>
      </table>
    </td>
  </tr>
  <tr>
	<td colspan="2">
      <div style="width:100%;height=360;overflow=auto;">
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
        <tr class="deepblue-left"> 
          <td width="1%" class="title_center">&nbsp;</td>
          <td class="title_center">经销商</td>
          <td class="title_center">非锁客户</td>
          <td class="title_center">产品</td>
		  <td class="title_center">销售数量</td>
          <td class="title_center">代表</td>
          <td class="title_center">业务区域</td>
          <td class="title_center"><%=label.getLabelName("L_CHuanGoods") %></td>
          <td class="title_center"><%=label.getLabelName("L_QTQTY") %></td>
		 <!--
		 			 <td class="title_center">分配人</td>
		  <td class="title_center">分配时间</td>
          <td class="title_center">审核人</td>
          <td class="title_center">审核人业务区域</td>
          <td class="title_center">审核时间</td>
		  <td class="title_center">状态</td>
		 			 -->
        </tr> 
        <tbody> 
          <%
            int i=0;
            String strChecked = "";
            String strClassType = "none";
            boolean bHasChecked = false;
          %>
          <logic:iterate id="onerow" collection="<%= summary %>">
          <%
            if(i%2 == 1){
              strClassType = "td-listrom";
            }else{
              strClassType = "none";
            }
            i++;
          %>
          <tr onMouseOver="this.className='tr-over'" onMouseOut="this.className='<%=JspHelper.filterNull( strClassType )%>'" onClick="radiotrue('radio<%=JspHelper.filterNull( i )%>')" class="<%=JspHelper.filterNull( strClassType )%>">
            <td>&nbsp;</td>
            <td><custom:write name="onerow" property="dtcode" nbsp="true"/>&nbsp;&nbsp;<custom:write name="onerow" property="dtname" nbsp="true"/></td>
            <td><custom:write name="onerow" property="orgcode" nbsp="true"/>&nbsp;&nbsp;<custom:write name="onerow" property="orgname" nbsp="true"/></td>
            <td><custom:write name="onerow" property="productcode" nbsp="true"/>&nbsp;&nbsp;<custom:write name="onerow" property="productname" nbsp="true"/></td>
			<td><custom:write name="onerow" property="qty" nbsp="true"/></td>
            <td><custom:write name="onerow" property="employeecode" nbsp="true"/>&nbsp;&nbsp;<custom:write name="onerow" property="employeename" nbsp="true"/></td>
            <td><custom:write name="onerow" property="userarea1name" nbsp="true"/></td>
            <td><custom:write name="onerow" property="chqty" nbsp="true"/></td>
            <td><custom:write name="onerow" property="qtqty" nbsp="true"/></td>
			<!--
			  <td><custom:write name="onerow" property="assignercode" nbsp="true"/>&nbsp;&nbsp;<custom:write name="onerow" property="assignername" nbsp="true"/></td>
			<td><custom:write name="onerow" property="assigndate" dataType="date" dataFormat="yyyy-MM-dd HH:mm:ss" nbsp="true"/></td>
            <td><custom:write name="onerow" property="commitname" nbsp="true"/></td>
            <td><custom:write name="onerow" property="commitareaname" nbsp="true"/></td>
			<td><custom:write name="onerow" property="commitdate" dataType="date" dataFormat="yyyy-MM-dd HH:mm:ss" nbsp="true"/></td>
            <td><custom:write name="onerow" property="status" nbsp="true" dictType="AssignStatus"/></td>
			   -->
          </tr>
          </logic:iterate>
          	 
        </tbody> 
        	<% HashMap allhash = (HashMap) pageContext.getAttribute("allhash");
        
	        	%>
        	 <tr><td colspan="4" class="td_right">&nbsp;<b><font color="red">总合计:</font></b></td>
        	 			<td class="red"><b><custom:write name="allhash" property="salestotalqty" nbsp="true" dataType="number" dataFormatName="qtyviewformat" /></b> </td>
        	 		<td colspan="4">&nbsp;</td></tr>
        <tfoot> 
	        <tr> 
	          <td colspan="31"> 
	          <%@ include file="/inc/SummaryAction.inc" %>
	          </td>
	        </tr>
	        </tfoot> 
      </table>
	  </div>
	  <table width="100%" cellspacing="0" cellpadding="0">
			<tr>
				<td class="summary_top"></td>
			</tr>
			<tr>
				<td class="td_center">
				<a onclick="page_downloadCSV();"><custom:button type="1" value="导出CSV" imgsrc="Modify.gif" border="0" style="width:100" privilegeCode="MB-FSFP01"/></a>&nbsp;&nbsp;
			
				<a onclick="page_downloadALLCSV();"><custom:button type="1" value="总部导出CSV" imgsrc="Modify.gif" border="0" style="width:100" privilegeCode="MB-FSFP02"/></a>&nbsp;&nbsp; 
				<a onclick="page_downloadEXCEL();"><custom:button type="1" value="修改下载" imgsrc="Modify.gif" border="0" style="width:100" privilegeCode="MB-FSFP04"/></a>&nbsp;&nbsp;
				<a onclick="page_uploadEXCEL();"><custom:button type="1" value="修改上载" imgsrc="Modify.gif" border="0" style="width:100" privilegeCode="MB-FSFP03"/></a>
		
				</td>
			</tr>
		</table>
    </td>
  </tr>
 </table>
 </form>
</body>
</html>